package org.gap.dao;

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.gap.domain.CaractPP;

import org.skyway.spring.util.dao.AbstractJpaDao;

import org.springframework.dao.DataAccessException;

import org.springframework.stereotype.Repository;

import org.springframework.transaction.annotation.Transactional;

/**
 * DAO to manage CaractPP entities.
 * 
 */
@Repository("CaractPPDAO")
@Transactional
public class CaractPPDAOImpl extends AbstractJpaDao<CaractPP> implements
		CaractPPDAO {

	/**
	 * Set of entity classes managed by this DAO.  Typically a DAO manages a single entity.
	 *
	 */
	private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(Arrays.asList(new Class<?>[] { CaractPP.class }));

	/**
	 * EntityManager injected by Spring for persistence unit 
	 *
	 */
	@PersistenceContext(unitName = "")
	private EntityManager entityManager;

	/**
	 * Instantiates a new CaractPPDAOImpl
	 *
	 */
	public CaractPPDAOImpl() {
		super();
	}

	/**
	 * Get the entity manager that manages persistence unit 
	 *
	 */
	public EntityManager getEntityManager() {
		return entityManager;
	}

	/**
	 * Returns the set of entity classes managed by this DAO.
	 *
	 */
	public Set<Class<?>> getTypes() {
		return dataTypes;
	}

	/**
	 * JPQL Query - findCaractPPByCppSituationFamille
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppSituationFamille(String cppSituationFamille) throws DataAccessException {

		return findCaractPPByCppSituationFamille(cppSituationFamille, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppSituationFamille
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppSituationFamille(String cppSituationFamille, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppSituationFamille", startResult, maxRows, cppSituationFamille);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppSexe
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppSexe(String cppSexe) throws DataAccessException {

		return findCaractPPByCppSexe(cppSexe, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppSexe
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppSexe(String cppSexe, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppSexe", startResult, maxRows, cppSexe);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituationAfter
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituationAfter(java.util.Calendar cppDateSituation) throws DataAccessException {

		return findCaractPPByCppDateSituationAfter(cppDateSituation, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituationAfter
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituationAfter(java.util.Calendar cppDateSituation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateSituationAfter", startResult, maxRows, cppDateSituation);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppCodeProfession
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppCodeProfession(String cppCodeProfession) throws DataAccessException {

		return findCaractPPByCppCodeProfession(cppCodeProfession, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppCodeProfession
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppCodeProfession(String cppCodeProfession, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppCodeProfession", startResult, maxRows, cppCodeProfession);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findAllCaractPPs
	 *
	 */
	@Transactional
	public Set<CaractPP> findAllCaractPPs() throws DataAccessException {

		return findAllCaractPPs(-1, -1);
	}

	/**
	 * JPQL Query - findAllCaractPPs
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findAllCaractPPs(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findAllCaractPPs", startResult, maxRows);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppNomPersContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPersContaining(String cppNomPers) throws DataAccessException {

		return findCaractPPByCppNomPersContaining(cppNomPers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNomPersContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPersContaining(String cppNomPers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNomPersContaining", startResult, maxRows, cppNomPers);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituationBefore
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituationBefore(java.util.Calendar cppDateSituation) throws DataAccessException {

		return findCaractPPByCppDateSituationBefore(cppDateSituation, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituationBefore
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituationBefore(java.util.Calendar cppDateSituation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateSituationBefore", startResult, maxRows, cppDateSituation);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissanceBefore
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissanceBefore(java.util.Calendar cppDateNaissance) throws DataAccessException {

		return findCaractPPByCppDateNaissanceBefore(cppDateNaissance, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissanceBefore
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissanceBefore(java.util.Calendar cppDateNaissance, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateNaissanceBefore", startResult, maxRows, cppDateNaissance);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppNif
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNif(Integer cppNif) throws DataAccessException {

		return findCaractPPByCppNif(cppNif, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNif
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNif(Integer cppNif, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNif", startResult, maxRows, cppNif);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppTiers
	 *
	 */
	@Transactional
	public CaractPP findCaractPPByCppTiers(Integer cppTiers) throws DataAccessException {

		return findCaractPPByCppTiers(cppTiers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppTiers
	 *
	 */

	@Transactional
	public CaractPP findCaractPPByCppTiers(Integer cppTiers, int startResult, int maxRows) throws DataAccessException {
		try {
			return executeQueryByNameSingleResult("findCaractPPByCppTiers", cppTiers);
		} catch (NoResultException nre) {
			return null;
		}
	}

	/**
	 * JPQL Query - findCaractPPByCppNomJeuneFilleContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomJeuneFilleContaining(String cppNomJeuneFille) throws DataAccessException {

		return findCaractPPByCppNomJeuneFilleContaining(cppNomJeuneFille, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNomJeuneFilleContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomJeuneFilleContaining(String cppNomJeuneFille, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNomJeuneFilleContaining", startResult, maxRows, cppNomJeuneFille);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppNombreEnfants
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNombreEnfants(Integer cppNombreEnfants) throws DataAccessException {

		return findCaractPPByCppNombreEnfants(cppNombreEnfants, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNombreEnfants
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNombreEnfants(Integer cppNombreEnfants, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNombreEnfants", startResult, maxRows, cppNombreEnfants);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissanceAfter
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissanceAfter(java.util.Calendar cppDateNaissance) throws DataAccessException {

		return findCaractPPByCppDateNaissanceAfter(cppDateNaissance, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissanceAfter
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissanceAfter(java.util.Calendar cppDateNaissance, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateNaissanceAfter", startResult, maxRows, cppDateNaissance);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppRegimeSocial
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppRegimeSocial(String cppRegimeSocial) throws DataAccessException {

		return findCaractPPByCppRegimeSocial(cppRegimeSocial, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppRegimeSocial
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppRegimeSocial(String cppRegimeSocial, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppRegimeSocial", startResult, maxRows, cppRegimeSocial);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppNomPers
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPers(String cppNomPers) throws DataAccessException {

		return findCaractPPByCppNomPers(cppNomPers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNomPers
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPers(String cppNomPers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNomPers", startResult, maxRows, cppNomPers);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysiqueAfter
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysiqueAfter(java.util.Calendar cppDateEtatPhysique) throws DataAccessException {

		return findCaractPPByCppDateEtatPhysiqueAfter(cppDateEtatPhysique, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysiqueAfter
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysiqueAfter(java.util.Calendar cppDateEtatPhysique, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateEtatPhysiqueAfter", startResult, maxRows, cppDateEtatPhysique);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppPrenomPersContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppPrenomPersContaining(String cppPrenomPers) throws DataAccessException {

		return findCaractPPByCppPrenomPersContaining(cppPrenomPers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppPrenomPersContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppPrenomPersContaining(String cppPrenomPers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppPrenomPersContaining", startResult, maxRows, cppPrenomPers);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysique
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysique(java.util.Calendar cppDateEtatPhysique) throws DataAccessException {

		return findCaractPPByCppDateEtatPhysique(cppDateEtatPhysique, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysique
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysique(java.util.Calendar cppDateEtatPhysique, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateEtatPhysique", startResult, maxRows, cppDateEtatPhysique);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByPrimaryKey
	 *
	 */
	@Transactional
	public CaractPP findCaractPPByPrimaryKey(Integer cppTiers) throws DataAccessException {

		return findCaractPPByPrimaryKey(cppTiers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByPrimaryKey
	 *
	 */

	@Transactional
	public CaractPP findCaractPPByPrimaryKey(Integer cppTiers, int startResult, int maxRows) throws DataAccessException {
		try {
			return executeQueryByNameSingleResult("findCaractPPByPrimaryKey", cppTiers);
		} catch (NoResultException nre) {
			return null;
		}
	}

	/**
	 * JPQL Query - findCaractPPByCppRegimeSocialContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppRegimeSocialContaining(String cppRegimeSocial) throws DataAccessException {

		return findCaractPPByCppRegimeSocialContaining(cppRegimeSocial, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppRegimeSocialContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppRegimeSocialContaining(String cppRegimeSocial, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppRegimeSocialContaining", startResult, maxRows, cppRegimeSocial);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituation
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituation(java.util.Calendar cppDateSituation) throws DataAccessException {

		return findCaractPPByCppDateSituation(cppDateSituation, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateSituation
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateSituation(java.util.Calendar cppDateSituation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateSituation", startResult, maxRows, cppDateSituation);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppQualite
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppQualite(String cppQualite) throws DataAccessException {

		return findCaractPPByCppQualite(cppQualite, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppQualite
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppQualite(String cppQualite, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppQualite", startResult, maxRows, cppQualite);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysiqueBefore
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysiqueBefore(java.util.Calendar cppDateEtatPhysique) throws DataAccessException {

		return findCaractPPByCppDateEtatPhysiqueBefore(cppDateEtatPhysique, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateEtatPhysiqueBefore
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateEtatPhysiqueBefore(java.util.Calendar cppDateEtatPhysique, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateEtatPhysiqueBefore", startResult, maxRows, cppDateEtatPhysique);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppEtatPhysique
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppEtatPhysique(String cppEtatPhysique) throws DataAccessException {

		return findCaractPPByCppEtatPhysique(cppEtatPhysique, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppEtatPhysique
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppEtatPhysique(String cppEtatPhysique, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppEtatPhysique", startResult, maxRows, cppEtatPhysique);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppNomJeuneFille
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomJeuneFille(String cppNomJeuneFille) throws DataAccessException {

		return findCaractPPByCppNomJeuneFille(cppNomJeuneFille, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppNomJeuneFille
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomJeuneFille(String cppNomJeuneFille, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNomJeuneFille", startResult, maxRows, cppNomJeuneFille);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissance
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissance(java.util.Calendar cppDateNaissance) throws DataAccessException {

		return findCaractPPByCppDateNaissance(cppDateNaissance, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppDateNaissance
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppDateNaissance(java.util.Calendar cppDateNaissance, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppDateNaissance", startResult, maxRows, cppDateNaissance);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppEtatPhysiqueContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppEtatPhysiqueContaining(String cppEtatPhysique) throws DataAccessException {

		return findCaractPPByCppEtatPhysiqueContaining(cppEtatPhysique, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppEtatPhysiqueContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppEtatPhysiqueContaining(String cppEtatPhysique, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppEtatPhysiqueContaining", startResult, maxRows, cppEtatPhysique);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppCodeProfessionContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppCodeProfessionContaining(String cppCodeProfession) throws DataAccessException {

		return findCaractPPByCppCodeProfessionContaining(cppCodeProfession, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppCodeProfessionContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppCodeProfessionContaining(String cppCodeProfession, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppCodeProfessionContaining", startResult, maxRows, cppCodeProfession);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppQualiteContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppQualiteContaining(String cppQualite) throws DataAccessException {

		return findCaractPPByCppQualiteContaining(cppQualite, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppQualiteContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppQualiteContaining(String cppQualite, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppQualiteContaining", startResult, maxRows, cppQualite);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppSexeContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppSexeContaining(String cppSexe) throws DataAccessException {

		return findCaractPPByCppSexeContaining(cppSexe, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppSexeContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppSexeContaining(String cppSexe, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppSexeContaining", startResult, maxRows, cppSexe);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppSituationFamilleContaining
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppSituationFamilleContaining(String cppSituationFamille) throws DataAccessException {

		return findCaractPPByCppSituationFamilleContaining(cppSituationFamille, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppSituationFamilleContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppSituationFamilleContaining(String cppSituationFamille, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppSituationFamilleContaining", startResult, maxRows, cppSituationFamille);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppPrenomPers
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppPrenomPers(String cppPrenomPers) throws DataAccessException {

		return findCaractPPByCppPrenomPers(cppPrenomPers, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppPrenomPers
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppPrenomPers(String cppPrenomPers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppPrenomPers", startResult, maxRows, cppPrenomPers);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * JPQL Query - findCaractPPByCppCsp
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppCsp(Integer cppCsp) throws DataAccessException {

		return findCaractPPByCppCsp(cppCsp, -1, -1);
	}

	/**
	 * JPQL Query - findCaractPPByCppCsp
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppCsp(Integer cppCsp, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppCsp", startResult, maxRows, cppCsp);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	/**
	 * Used to determine whether or not to merge the entity or persist the entity when calling Store
	 * @see store
	 * 
	 *
	 */
	public boolean canBeMerged(CaractPP entity) {
		return true;
	}
	
	
	
	/**
	 * JPQL Query - findCaractPPByCppNomPers
	 *
	 */
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPersAndPrenomPers(String cppNomPers) throws DataAccessException {

		return findCaractPPByCppNomPersAndPrenomPers(cppNomPers, -1, -1);
	}
	
	/**
	 * JPQL Query - findCaractPPByCppNomPers
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<CaractPP> findCaractPPByCppNomPersAndPrenomPers(String cppNomPers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findCaractPPByCppNomPersAndPrenomPers", startResult, maxRows, cppNomPers);
		return new LinkedHashSet<CaractPP>(query.getResultList());
	}

	public Set<String> findNomPers() throws DataAccessException {
		// TODO Auto-generated method stub
		return findNomPers(-1, -1);
	}
	
	/**
	 * JPQL Query - findNomPers
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<String> findNomPers(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findNomPers", startResult, maxRows);
		return new LinkedHashSet<String>(query.getResultList());
	}
}
